package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DelayRetireMapper;
import com.ruoyi.system.domain.DelayRetire;
import com.ruoyi.system.service.IDelayRetireService;

/**
 * 延迟退休Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-22
 */
@Service
public class DelayRetireServiceImpl implements IDelayRetireService 
{
    @Autowired
    private DelayRetireMapper delayRetireMapper;

    /**
     * 查询延迟退休
     * 
     * @param id 延迟退休主键
     * @return 延迟退休
     */
    @Override
    public DelayRetire selectDelayRetireById(Long id)
    {
        return delayRetireMapper.selectDelayRetireById(id);
    }

    /**
     * 查询延迟退休列表
     * 
     * @param delayRetire 延迟退休
     * @return 延迟退休
     */
    @Override
    public List<DelayRetire> selectDelayRetireList(DelayRetire delayRetire)
    {
        return delayRetireMapper.selectDelayRetireList(delayRetire);
    }

    /**
     * 新增延迟退休
     * 
     * @param delayRetire 延迟退休
     * @return 结果
     */
    @Override
    public int insertDelayRetire(DelayRetire delayRetire)
    {
        delayRetire.setCreateTime(DateUtils.getNowDate());
        return delayRetireMapper.insertDelayRetire(delayRetire);
    }

    /**
     * 修改延迟退休
     * 
     * @param delayRetire 延迟退休
     * @return 结果
     */
    @Override
    public int updateDelayRetire(DelayRetire delayRetire)
    {
        delayRetire.setUpdateTime(DateUtils.getNowDate());
        return delayRetireMapper.updateDelayRetire(delayRetire);
    }

    /**
     * 批量删除延迟退休
     * 
     * @param ids 需要删除的延迟退休主键
     * @return 结果
     */
    @Override
    public int deleteDelayRetireByIds(Long[] ids)
    {
        return delayRetireMapper.deleteDelayRetireByIds(ids);
    }

    /**
     * 删除延迟退休信息
     * 
     * @param id 延迟退休主键
     * @return 结果
     */
    @Override
    public int deleteDelayRetireById(Long id)
    {
        return delayRetireMapper.deleteDelayRetireById(id);
    }
}
